﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TimbreRecognition.Desktop
{
    public class PresenterHelper
    {
        public static string FormatNetworkOutput(double[] classes, double[] output)
        {
            StringBuilder text = new StringBuilder();
            double[] values = classes;
            for (int j = 0; j < values.Length; j++)
            {
                double value = values[j];
                text.Append(value.ToString("F0"));
                text.Append("  ");
            }

            text.Append("    (");

            double[] outputs = output;
            for (int j = 0; j < outputs.Length; j++)
            {
                double value = outputs[j];
                text.Append(value.ToString("F1"));
                text.Append("  ");
            }

            text.Append(")");

            return text.ToString();
        }
    }
}
